package com.javatest.validate;

import org.hibernate.validator.internal.engine.DefaultParameterNameProvider;

import javax.validation.ParameterNameProvider;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @date 2020-11-10 下午2:28
 */
public class ValidatorTest10 {
    public static void main(String[] args) {
        ParameterNameProvider parameterNameProvider = new DefaultParameterNameProvider();

        // 拿到Person的无参构造和有参构造（@NoArgsConstructor和@AllArgsConstructor）
        Arrays.stream(Person.class.getConstructors())
                .forEach(c -> System.out.println(parameterNameProvider.getParameterNames(c)));
    }
}
